from django.db import models

# Create your models here.
class Leavetype(models.Model):
    tname = models.CharField(max_length=20)



class Leavemod(models.Model):
    STATUS = [(0,'待审核'),(1,'通过'),(2,'未通过')]
    stuname = models.CharField(max_length=20,null=False)
    status = models.IntegerField(choices=STATUS, default=0)
    createTime = models.DateTimeField()
    context = models.CharField(max_length=200)
    tid = models.ForeignKey(Leavetype,on_delete=models.CASCADE,null=True)


class User(models.Model):
    ROLE = ((1,'学生'),(2,'老师'))
    uname = models.CharField(max_length=20,null=False)
    upwd = models.CharField(max_length=20,null=False)

    role = models.IntegerField(max_length=1,choices=ROLE)

















